#ifndef     __DEVICE_INHO_H
#define     __DEVICE_INFO_H


#include <stdint.h>
#include "../driver/flash.h"

namespace service {

struct DeviceInfo {
    uint32_t volume;
    uint32_t price;
    uint32_t price_sum;
    uint32_t sweet_count;

    void reset() {
        volume = 15;
        price = 10;
        price_sum = 0;
        sweet_count = 0;
    }
};

extern driver::flash::Store<DeviceInfo, driver::flash::Base> deviceInfo;

void add_price(uint32_t price);
void add_sweet();

}



#endif
